package com.rupertjones.globalcron.web;

import com.rupertjones.globalcron.domain.Host;
import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.ForwardResolution;
import net.sourceforge.stripes.action.Resolution;

import java.util.Collection;

/**
 * <p>&copy Rupert Jones 2011</p>
 *
 * @author rup
 */
public class InfoHostsAction extends AbstractAction {

    public Collection<Host> getHosts() {
        return getJobService().getHosts();
    }

    @DefaultHandler
    public Resolution view() {
        return new ForwardResolution("/WEB-INF/jsp/info_hosts.jsp");
    }
}
